<?php
?>
<html>
<head></head>
<body>
    <table border="1" cellspacing="0" cellpadding="0">
        <?php for ($i = 1; $i <= 9; $i++):?>
        <tr>
            <?php for ($j = 1; $j <= $i; $j++):?>
            <td <?php if ($i % 2 == 0):?>
                    style="background-color: gray"
                <?php endif;?>>
                <?php
                    echo $j . '*' . $i . '=' . $i * $j;
                ?>
            </td>
            <?php endfor;?>
        </tr>
        <?php endfor;?>
    </table>
</body>
</html>
